<template>
    <div>
        <tinymce-editor
            ref="editor"
            v-model="msg"
            :value="msg"
            :disabled="disabled"
            @showContent="showContent"
        >
        </tinymce-editor>
    </div>
</template>

<script>
import TinymceEditor from "@/components/tinymce/editor";
export default {
    components: {
        TinymceEditor,
    },
    data() {
        return {
            description: "富文本编辑器",
            menus: {
                update: { name: "可编辑" },
                only_show: { name: "仅查看" },
            },
            msg: null,
            disabled: false,
        };
    },
    mounted() {
        this.msg =
            '<p><span style="color: #e03e2d;"><strong>欢迎使用富文本编辑软件！</strong></span></p>';
    },
    methods: {
        showContent(message) {
            this.msg = message;
        },
        showMessage() {
            console.log(this.msg);
        },
    },
};
</script>
